#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, x;
    cin >> n >> x;
    vector<int> a(n + 1);
    for (int i = 1; i <= n; i++)
    {
        cin >> a[i];
        a[i] += a[i - 1];
    }

    int l = 1, res = 0, len = INT_MAX;
    for (int r = 1; r <= n; r++)
    {
        while (l < n && a[r] - a[l - 1] >= x)
        {
            if (r - l + 1 < len)
            {
                res = l;
                len = r - l + 1;
            }
            l++;
        }
    }
    cout << res << " " << res + len - 1 << endl;
    return 0;
}